import type { Column } from "@/components/ProTable/ProTable.vue";

import { useGlobalStore } from "@/stores";
const { dictionary } = useGlobalStore();
export const columns = [
  {
    label: "姓名",
    prop: "staffName",
  },
  {
    label: "职位",
    prop: "--position",
    format: (val: number, { position }: any) => {
      const res = dictionary.groupPosition.filter(
        ({ value }) => value == position
      );
      if (!res[0]) return "";
      return res[0].label;
    },
  },
  {
    label: "所属工作组",
    prop: "workingGroup",
  },
  {
    label: "联系方式",
    prop: "phone",
  },
  {
    label: "职责",
    prop: "duty",
  },
].map((e: Column) => ({ ...e, dataIndex: e.prop }));
